import './style.css'
import {Tabs} from "antd-mobile";
import {useTabs} from "@/hooks/useTabs";
import HomeList from "@/pages/Home/HomeList";

const Home = () => {

    // 频道数据
    const {channelList} = useTabs();

    return <div className="tabContainer">
        {/*  tab区域  */}
        <Tabs defaultActiveKey='0'>
            {channelList.map(item => (
                <Tabs.Tab title={item.name} key={item.id}>
                    {/*  list区域  */}
                    <div className="listContainer">
                        <HomeList channelId={'' + item.id}/>
                    </div>
                </Tabs.Tab>
            ))}
        </Tabs>
    </div>
}

export default Home